package org.example.aienglishapp_login.entity.operationlog;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author Asus
 * @version 1.0
 * @since 2024/12/18 16:49
 */

@Data
public class OperationLog {

    @ExcelIgnore
    private Long id;

    @ExcelProperty("操作人")
    private String username;

    @ExcelProperty("执行操作")
    private String operation;

    @ExcelProperty("调用方法")
    private String method;

    @ExcelProperty("请求参数")
    private String params;

    @ExcelProperty("返回结果")
    private String result;

    @ExcelProperty("执行时间")
    private Long elapsedTime;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @ExcelProperty("IP地址")
    private String ipAddress;

    @ExcelProperty("操作状态")
    private String status;
}
